/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/03/17
* File: EffectBase.cpp
* Blog: http://www.cnblogs.com/zengqh/
**/

#include "Effect.h"

namespace HY
{

EffectManager* Effect::getEffectManager() const
{
	return eff_mgr_;
}

ParameterManager* Effect::getParamManager() const
{
	return param_mgr_;
}

uint32 Effect::getFlags() const
{
	return flags_;
}

uint32 Effect::addFlags(uint32 flags)
{
	flags_ |= flags;
	return flags;
}

uint32 Effect::deleteFlags(uint32 flags)
{
	flags_ &= ~flags;
	return flags;
}

void Effect::setFlags(uint32 flags)
{
	flags_ = flags;
}

EffectTechnique* Effect::createTechnique(const std::string& name)
{
	EffectTechnique* te = new EffectTechnique(this, name);
	technique_list_.push_back(te);

	return te;
}

uint32 Effect::getNumOfTechniques() const
{
	return technique_list_.size();
}

Effect::Effect(EffectManager* mgr, const std::string& name)
: eff_mgr_(mgr)
, name_(name)
{
	
}

Effect::~Effect()
{

}


}